package zhang.automobileservice;

import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.widget.ImageView;

import java.util.Timer;
import java.util.TimerTask;

public class NavigationActivity extends FarterActivity{
    private ImageView imageView;
    SharedPreferences preferences;
    SharedPreferences.Editor editor;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_navigation);
        preferences=this.getSharedPreferences("TAGtext",MODE_PRIVATE);
        if(preferences.contains("TAG")){
            new Timer().schedule(new TimerTask() {
                @Override
                public void run() {
                    Intent intent = new Intent(NavigationActivity.this,FirstpageActivity.class);
                    startActivity(intent);
                    finish();
                }
            },1000);

        }else{
            editor=preferences.edit().putString("TAG","001");
            editor.commit();
            new Timer().schedule(new TimerTask() {
                @Override
                public void run() {
                    Intent intent = new Intent(NavigationActivity.this,GuideActivity.class);
                    startActivity(intent);
                    finish();
                }
            },1000);

        }

    }


}
